package com.day09.Demo;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        // 定义群主
        QunZhu zhangsan = new QunZhu("zhangsan", 1000);
        // 定义三个成员
        Member a = new Member("a", 100);
        Member b = new Member("b", 200);
        Member c = new Member("c", 300);

        // 群主发红包
        ArrayList<Double> sendList = zhangsan.sendHongbao(2, 100);

        // 判断红包为不为空
        if (sendList == null) {
            System.out.println("余额不足");
            return;
        }
        a.openHongbao(sendList);
        b.openHongbao(sendList);
        c.openHongbao(sendList);

        // 显示每个人的信息
        System.out.println();
        zhangsan.show();
        a.show();
        b.show();
        c.show();
    }
}
